import time
from public.action import *
from public.business import *
from public.testData import *
from public.tools import *

testCase = "DBshop022_商品管理商品品牌删除品牌"
firefox=openBrowser(urlAdmin)
firefox.get(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu2(firefox, '商品管理', '商品品牌',)
firefox.find_element_by_link_text("删除").click()
time.sleep(2)
try:
    firefox.find_element_by_xpath("//td[contains(text(),'%s')]"%brandname).is_displayed()
    writeLog("%s 测试失败" % testCase)
    getPhoto(firefox)
except:
    writeLog("%s 测试通过" % testCase)